package com.bytedance.ttnet.b;

import org.json.JSONException;
import org.json.JSONObject;

public final class GetDomainContext {
    public int status;
    public String url;
    public long queryTime;
    public String errMsg = "";
    public String rawSign;
    public String ssSign;
    public String localSign;
    public boolean useHttps;

    public final JSONObject toJson() throws JSONException {
        JSONObject v0 = new JSONObject();
        v0.put("status", this.status);
        v0.put("url", this.url);
        v0.put("query_time", this.queryTime);
        if (!this.useHttps) {
            v0.put("raw_sign", this.rawSign);
            v0.put("ss_sign", this.ssSign);
            v0.put("local_sign", this.localSign);
        }

        if (!android.support.design.a.isTextEmpty(this.errMsg)) {
            v0.put("err_msg", this.errMsg);
        }

        return v0;
    }
}

